package com.ys.fmms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ys.fmms.mapper.HumanBodyInfraredMapper;
import com.ys.fmms.pojo.HumanBodyInfrared;
import com.ys.fmms.service.HumanBodyInfraredService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service(value = "humanBodyInfraredServiceImpl")
public class HumanBodyInfraredServiceImpl extends ServiceImpl<HumanBodyInfraredMapper, HumanBodyInfrared> implements HumanBodyInfraredService {
    @Override
    public HumanBodyInfrared getLast() {
        QueryWrapper<HumanBodyInfrared> wrapper = new QueryWrapper<>();
        wrapper.orderByDesc("create_time");
        wrapper.last("limit 1");
        return baseMapper.selectOne(wrapper);
    }
}
